package com.sun.controller;

import com.sun.annotation.Log;
import com.sun.feign.OrderFeignService;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/member")
public class MemberController {

    @Resource
    private OrderFeignService orderFeignService;



    @RequestMapping("/hello")
    public String hello(){
       return orderFeignService.hello();
    }

    @Log
    @Cacheable(value = "test",key = "#root.method.name")
    @RequestMapping("/test")
    public String test(){
        return "test";
    }
}
